home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / misc / edu / polyglot.lha / Polyglot / Install < prev    next >
Encoding:
Text File  |  1998-01-07  |  12.1 KB  |  447 lines

  1. ;             POLYGLOT 1.25
  2. ;   Installation Script - Installer 2.0
  3. ;    Author: Michal /CompLex/ Mecinski
  4. ;       (C)1998 CompLex, Shareware
  5. ; $VER: install_e 1.25 (7.1.98) CompLex
  6.  
  7.  
  8. ; ======== Language ==========
  9.  
  10. ; Polish translation by CompLex
  11. (if (= @app-name "Poliglota 1.25 (PL)")
  12. (
  13.     (set #lang "polski")
  14.     (set #msg_os "Aby zainstalowaê i uruchomiê POLIGLOTË 1.25musisz mieê system V37 (2.0) lub wyûszy.")
  15.     (set #msg_welc "Witaj w polskiej wersji\nskryptu instalacyjnego POLIGLOTY 1.25")
  16.     (set #msg_mdir (cat "Czy chcesz utworzyê NOWY katalog o nazwie \"Poliglota\" (z ikonâ), "
  17.             "do którego zostanie skopiowany "
  18.             (if (= @user-level 2) "gîówny program" "program, dokumetacja i ustawienia")
  19.             "?"
  20.     ))
  21.     (set #help_mdir    (cat "Odpowiedz \"Tak\", jeûeli chcesz aby zostaî utworzony nowy"
  22.             " katalog \"Poliglota\" (z ikonâ) we wskazanym miejscu.\n"
  23.             " Jeûeli posiadasz juû taki katalog, lub chcesz zainstalowaê"
  24.             " program w innym katalogu, odpowiedz przeczâco."
  25.     ))
  26.     (set #msg_mdn (cat "Wybierz dysk, partycjë lub katalog, w którym zostanie"
  27.             " utworzony nowy podkatalog \"Poliglota\"."
  28.     ))
  29.     (set #msg_mdo (cat "Wybierz dysk, partycjë lub katalog, w którym zostanie"
  30.             " zainstalowany program."
  31.     ))
  32.     (set #name_pol "Poliglota")
  33.     (set #name_polic "Poliglota.info")
  34.     (set #name_bas "Bazy")
  35.     (set #name_basic "Bazy.info")
  36.     (set #name_docs "Poliglota_PL.Guide")
  37.     (set #name_docd "Poliglota.Guide")
  38.     (set #name_exam "Przykîady.plg")
  39.     (set #name_defic "def_bazaplg.info")
  40.     (set #name_defni "def_bazaplg")
  41.     (set #name_pref "poliglota.prefs")
  42.     (set #msg_doc "Gdzie skopiowaê dokumentacjë POLIGLOTY (plik \"Poliglota.guide\")?")
  43.     (set #help_doc "Dokumentacja jest niezbëdna aby korzystaê z tego programu!")
  44.     (set #msg_bases (cat "Czy utworzyê nowy katalog o nazwie \"Bazy\" do przechowywania"
  45.             " baz danych Poligloty?"
  46.     ))
  47.     (set #help_bases (cat "Jeôli odpowiesz twierdzâco, zostanie utworzony (we wskazanym miejscu)"
  48.             " nowy katalog o nazwie \"Bazy\" z ikonâ.\n"
  49.             "Jeôli nie, bëdziesz musiaî wybraê istniejâcy katalog."
  50.     ))
  51.     (set #msg_bsn "Wybierz miejsce, w którym zostanie utworzony nowy katalog \"Bazy\"")
  52.     (set #msg_bso "Wybierz katalog, w którym bëdâ przechowywane bazy danych")
  53.     (set #msg_pref "Gdzie majâ byê zapisane ustawienia Poligloty (plik poliglota.prefs)?")
  54.     (set #help_pref (cat "Nie warto uûywaê EnvArc, Poliglota zapisuje ustawienia od razu"
  55.             " na dysk. Najlepsze miejsce to katalog Poligloty lub S."
  56.     ))
  57.     (set #msg_icon "Czy chcesz, aby bazy danych byîy zapisywane wraz z ikonâ?")
  58.     (set #help_icon    (cat "Jeûeli chcesz uruchamiaê Poliglotë z Workbecha, moûesz wybraê"
  59.             " tworzenie ikony dla kaûdej bazy. Za pomocâ takiej ikony moûesz"
  60.             " automatycznie uruchomiê Poliglotë.\n"
  61.             "Z Shell/Cli niepotrzebne sâ ikony bazy, ale sam program musi jâ"
  62.             " mieê (zapisane sâ tam ôcieûki dostëpu!)"
  63.     ))
  64.     (set #msg_defic "Gdzie ma byê zapisana domyôlna ikona bazy danych o nazwie \"def_bazaplg.info\" ?")
  65.     (set #msg_info (cat "Gîówny program zostanie zainstalowany w katalogu \"%s\","
  66.             " dokumentacja w \"%s\", przykîadowa baza danych w \"%s\"."
  67.     ))
  68.     (set #msg_paths (cat "W ikonie programu zostanâ teraz zapisane ôcieûki dostëpu"
  69.             " do programu, katalogu baz i ikony domyôlnej (lub jej brak)."
  70.             " Jeûeli przeniesiesz jakâô czëôê pakietu, bëdziesz musiaî je zmieniê"
  71.             " (patrz dokumentacja)."
  72.     ))
  73.     (set #msg_loc "Czy chcesz, aby Poliglota uûywaî jëzyka polskiego?")
  74.     (set #help_loc (cat "Jeôli chcesz, aby wszystkie komunikaty byîy po polsku,"
  75.             " trzeba bëdzie zainstalowaê polskie tîumaczenie (catalog).\n"
  76.             "W przeciwnym wypadku, program bëdzie uûywaî wbudowanego jëzyka"
  77.             " angielskiego."
  78.     ))
  79.     (set #msg_lib "Skopiujë bibliotekë \"reqtools.library\" do katalogu Libs:")
  80.     (set #help_lib (cat "Biblioteka jest niezbëdna do dziaîania programu. Skopiuj jâ,"
  81.         " jeûeli twoja wersja jest starsza lub nie masz jej."
  82.     ))
  83.     (set #msg_end (cat "Program nie ma jeszcze zapisanych ustawieï. Uruchom Poliglotë"
  84.     " z Workbencha i wybierz opcjë Zapisz w oknie Ustawienia.\n"
  85.     "Szczegóîowe informacje na temat uûywania programu znajdziesz w dokumentacji."
  86.     " Pomocna bëdzie takûe zainstalowana w katalogu baz przykîadowa baza opisana"
  87.     " w dokumentacji.\n\n"
  88.     "Ûyczë wielu sukcesów w uûywaniu Poligloty!"
  89.     ))
  90. )
  91. ;Default English language
  92. (
  93.     (set #lang "english")
  94.     (set #msg_os "You must have OS V37 (2.0) or more to run and install Polyglot.")
  95.     (set #msg_welc "Welcome to the English version\nof POLYGLOT 1.25 Installation Script")
  96.     (set #msg_mdir (cat "Do you want to create a NEW directory called 'Polyglot' (with icon), "
  97.             "where the "
  98.             (if (= @user-level 2) "main program" "program, documetation and settings")
  99.             " will be installed?")
  100.     )
  101.     (set #help_mdir    (cat "Answer 'Yes', if you want a new directory created"
  102.             " called 'Polyglot' (with an icon) in selected place.\n"
  103.             " If a directory already exists or you want the program"
  104.             " installed in another directory, say 'No'."
  105.     ))
  106.     (set #msg_mdn (cat "Select a disk, partition or directory, in which"
  107.             " a new 'Polyglot' subdirectory will be created."
  108.     ))
  109.     (set #msg_mdo (cat "Select a disk, partition or directory, in which"
  110.             " the program will be installed."
  111.     ))
  112.     (set #name_pol "Polyglot")
  113.     (set #name_polic "Polyglot.info")
  114.     (set #name_bas "Bases")
  115.     (set #name_basic "Bases.info")
  116.     (set #name_docs "Polyglot_ENG.Guide")
  117.     (set #name_docd "Polyglot.Guide")
  118.     (set #name_exam "Examples.plg")
  119.     (set #name_defic "def_plgbase.info")
  120.     (set #name_defni "def_plgbase")
  121.     (set #name_pref "polyglot.prefs")
  122.     (set #msg_doc "Where should the POLYGLOT documentation ('Polyglot.guide' file) be copied?")
  123.     (set #help_doc "The documentation is necessary to use this program!")
  124.     (set #msg_bases (cat "Do you want to create a NEW directory called 'Bases' (with icon), "
  125.             " for Polyglot bases?")
  126.     )
  127.     (set #help_bases (cat "If you answer 'Yes', a new directory called"
  128.             " 'Bases' (with an icon) will be created in selected place.\n"
  129.             " If not, you'll have to select an existing directory."
  130.     ))
  131.     (set #msg_bsn "Select a place, where a new 'Bases' directory will be created")
  132.     (set #msg_bso "Select a directory in which the data bases will be stored.")
  133.     (set #msg_pref "Where should the Polyglot preferences be saved ('polyglot.prefs' file)?")
  134.     (set #help_pref (cat "Don't use EnvArc, because Polyglot will save prefs"
  135.             " to the disk at once. A best place is Polyglot home dir or S dir."
  136.     ))
  137.     (set #msg_icon "Do you want the bases saved with their icons?")
  138.     (set #help_icon    (cat "If you want to run Polyglot from Workbench, you may"
  139.             " select creating an icon for every base. You can run Polyglot"
  140.             " automatically with a base icon then.\n"
  141.             "From Shell/Cli the base icons are unnecessary, but the program"
  142.             " must have one (paths are stored there!)"
  143.     ))
  144.     (set #msg_defic "Where should be the default base icon ('def_plgbase.info') copied?")
  145.     (set #msg_info (cat "The main program will be installed in the '%s' directory,"
  146.             " documentation in '%s', example data base in '%s'."
  147.     ))
  148.     (set #msg_paths (cat "Now, I will save paths of the program, bases"
  149.             " directory and default info (if exists) to the program"
  150.             " icon. You'll have to change them manually if you move"
  151.             " anything (see documentation)."
  152.     ))
  153.     ; locale not used in English mode, just for translators
  154.     (set #msg_loc "Do you want the Polyglot use xxx language?")
  155.     (set #help_loc (cat "If you want all messages etc. in the program in xxx language,"
  156.             " the xxx locale must be installed.\n"
  157.             "Else, the program will use built-in English."
  158.     ))
  159.     (set #msg_lib "I will copy the 'reqtools.library' to your Libs: directory")
  160.     (set #help_lib (cat "This library is necessary for the program. Copy it,"
  161.         " if you have older or no reqtools.library."
  162.     ))
  163.     (set #msg_end (cat "The program has no prefs yet. Run Polyglot"
  164.     " from Workbench and select Save option in Preferences window.\n"
  165.     "All information about using the program may be found in the documentation."
  166.     " The example database will be also usefull - it's installed in your bases directory."
  167.     " (see documentation for more info).\n\n"
  168.     "I wish you using the Polyglot successfully!"
  169.     ))
  170. ))
  171.  
  172. ; ======== Check OS version ========
  173.  
  174. (if (< (/ (getversion) $10000) 37)
  175.     (abort #msg_os)
  176. )
  177.  
  178. (complete 0)
  179.  
  180. (set #instd (pathonly @icon))
  181.  
  182. (welcome #msg_welc)
  183.  
  184. ; ========== Main dir ========
  185.  
  186. (set #mainc
  187.     (askbool
  188.         (prompt #msg_mdir)
  189.         (help #help_mdir)
  190.     )
  191. )
  192.  
  193. (set #maind
  194.     (askdir
  195.         (prompt
  196.             (if #mainc #msg_mdn #msg_mdo)
  197.         )
  198.         (help @askdir-help)
  199.         (default "Sys:")
  200.         (disk)
  201.     )
  202. )
  203.  
  204. ; ---- Must be created now ----
  205.  
  206. (if #mainc
  207.     (
  208.         (makedir (tackon #maind #name_pol))
  209.         (copyfiles
  210.             (source (cat #instd ".info"))
  211.             (dest #maind)
  212.             (newname #name_polic)
  213.             (nogauge)
  214.         )
  215.         (set #maind (tackon #maind #name_pol))
  216.     )
  217. )
  218.  
  219. (set @default-dest #maind)
  220. (complete 10)
  221.  
  222. ; ========= Expert: Documentation ========
  223.  
  224. (if (= @user-level 2)
  225. (set #docd
  226.     (askdir
  227.         (prompt #msg_doc)
  228.         (help #help_doc)
  229.         (default #maind)
  230.     )
  231. )
  232. (set #docd #maind)
  233. )
  234.  
  235. (complete 20)
  236.  
  237. ; ========= Bases dir ======
  238.  
  239. (set #basc
  240.     (askbool
  241.         (prompt #msg_bases)
  242.         (help #help_bases)
  243.     )
  244. )
  245.  
  246. (set #basd
  247.     (askdir
  248.         (prompt
  249.             (if #basc #msg_bsn #msg_bso)
  250.         )
  251.         (help @askdir-help)
  252.         (default #maind)
  253.     )
  254. )
  255. ; ----- create the dir now -------
  256. (if #basc
  257.     (
  258.         (makedir (tackon #basd #name_bas))
  259.         (copyfiles
  260.             (source (tackon #instd "Bases.info"))
  261.             (dest #basd)
  262.             (newname #name_basic)
  263.             (nogauge)
  264.         )
  265.         (set #basd (tackon #basd #name_bas))
  266.     )
  267. )
  268.  
  269. (complete 30)
  270.  
  271. ; ========= EXPERT: place for settings =======
  272. (if (= @user-level 2)
  273. (
  274.     (set #pred
  275.         (askdir
  276.             (prompt #msg_pref)
  277.             (help #help_pref)
  278.             (default #maind)
  279.         )
  280.     )
  281.     (complete 40)
  282. )
  283. (set #pred #maind)
  284. )
  285. ; ========== Workbench-support? =========
  286. (set #icoc
  287.     (askbool
  288.         (prompt #msg_icon)
  289.         (help #help_icon)
  290.     )
  291. )
  292.  
  293. ; ======== EXPERT: default base icon =======
  294. (if #icoc
  295.     (if (= @user-level 2)
  296.         (
  297.             (set #icod
  298.                 (askdir
  299.                     (prompt #msg_defic)
  300.                     (help @askdir-help)
  301.                     (default #basd)
  302.                 )
  303.             )
  304.         )
  305.         (set #icod #basd)
  306.     )
  307. )
  308.  
  309. (complete 55)
  310.  
  311.  
  312. ; ======== Polish locale? =======
  313.  
  314. (if (<> #lang "english")
  315.     (set #loc
  316.         (askbool
  317.             (prompt #msg_loc)
  318.             (help #help_loc)
  319.         )
  320.     )
  321.     (set #loc 0)
  322. )
  323. (if #loc
  324.     (if (exists "Locale:" (noreq))
  325.         (set #locd (cat "Locale:Catalogs/" #lang))
  326.         (set #locd (tackon #maind (cat "catalogs/" #lang)))
  327.     )
  328. )
  329.  
  330. (complete 60)
  331.  
  332. ; ============ COPY FILES ===========
  333.  
  334. ; --- Information ---
  335. (message (#msg_info #maind #docd #basd))
  336.  
  337. ; --- Program and documentation ---
  338. (copyfiles
  339.     (source (tackon #instd "Polyglot"))
  340.     (dest #maind)
  341.     (newname #name_pol)
  342.     (infos)
  343. )
  344.  
  345. (copyfiles
  346.     (source (tackon #instd (cat "Docs/" #name_docs)))
  347.     (dest #docd)
  348.     (newname #name_docd)
  349.     (infos)
  350. )
  351. ; --- Bases (with or without icons) ---
  352. (if #icoc
  353.     (
  354.         (copyfiles
  355.             (source (tackon #instd (cat "Bases/" #name_exam)))
  356.             (dest #basd)
  357.             (infos)
  358.         )
  359.         (copyfiles
  360.             (source (tackon #instd "Bases/def_plgbase.info"))
  361.             (dest #icod)
  362.             (newname #name_defic)
  363.         )
  364.     )
  365.     (
  366.         (copyfiles
  367.             (source (tackon #instd (cat "Bases/" #name_exam)))
  368.             (dest #basd)
  369.         )
  370.     )
  371. )
  372. ; --- Locale ----
  373. (if #loc
  374.     (if (exists "Locale:" (noreq))
  375.         (
  376.             (makedir "Locale:Catalogs")
  377.             (makedir (cat "Locale:Catalogs/" #lang))
  378.             (copyfiles
  379.                 (source (tackon #instd (cat "catalogs/" #lang "/polyglot.catalog")))
  380.                 (dest (cat "Locale:Catalogs/" #lang))
  381.             )
  382.         )
  383.         (
  384.             (makedir (tackon #maind "catalogs"))
  385.             (makedir (tackon #maind (cat "catalogs/" #lang)))
  386.             (copyfiles
  387.                 (source (tackon #instd (cat "catalogs/" #lang "/polyglot.catalog")))
  388.                 (dest (tackon #maind (cat "catalogs/" #lang)))
  389.             )
  390.         )
  391.     )
  392. )
  393.  
  394. (complete 75)
  395.  
  396. ; ========= ToolTypes Setting (paths) ========
  397.  
  398. (message #msg_paths)
  399.  
  400. (working)
  401.  
  402. (tooltype
  403.     (dest (tackon #maind #name_pol))
  404.     (if #icoc
  405.         (settooltype "ICON" (tackon #icod #name_defni))
  406.         (settooltype "ICON")
  407.     )
  408.     (settooltype "DIR" #basd)
  409.     (settooltype "PREFS" (tackon #pred #name_pref))
  410.     (if #loc (settooltype "LANGUAGE" #lang))
  411. )
  412. (if #icoc
  413.     (
  414.         (tooltype
  415.             (dest (tackon #basd #name_exam))
  416.             (setdefaulttool (tackon #maind #name_pol))
  417.         )
  418.         (tooltype
  419.             (dest (tackon #icod #name_defni))
  420.             (setdefaulttool (tackon #maind #name_pol))
  421.         )
  422.     )
  423. )
  424. (complete 85)
  425.  
  426. ; ======== ReqTools.library =======
  427. (set #temp @user-level)
  428. (user 2)
  429.  
  430. (copylib
  431.     (prompt #msg_lib)
  432.     (help #help_lib)
  433.     (source (tackon #instd "libs/reqtools.library"))
  434.     (dest "Libs:")
  435.     (confirm)
  436. )
  437.  
  438. (user #temp)
  439.  
  440. ; ====== END ======
  441.  
  442. (complete 95)
  443.  
  444. (message #msg_end)
  445.  
  446. (complete 100)
  447.